home *** CD-ROM | disk | FTP | other *** search
- Path: news1.intercall.com!usenet
- From: engevar@intercall.com (Steven Ovits)
- Newsgroups: comp.lang.c
- Subject: Re: Pointer to Functions and Calls thereof??
- Date: Thu, 18 Apr 1996 18:40:01 GMT
- Organization: Intercall Inc.
- Message-ID: <4l5p15$sl0@news1.intercall.com>
- References: <Dq01Ft.Dqn@latcs1.lat.oz.au> <4l2tlmINN822@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: ts3-144.intercall.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) wrote:
-
- > In article <Dq01Ft.Dqn@latcs1.lat.oz.au>,
- >> { void *a[1];
- [snip]
- > Secondly, when you declare an array TYPE a[1], you may only access elements
- > a[0] and a[1]. Accessing element a[2] is not allowed. The C Standard calls it
- > undefined behavior.
- > By the way, if you want an array of two functions, you can declare this:
- > void (* funarray[3])(void);
-
- The definition TYPE a[1] has only 1 object of type TYPE named a[0].
- Similarly, void (*funarray[3])(void) is an array of 3 function
- pointers.
-
-
-